/********************************************************************
  Copyright by PCI, 2002-10-08
  File Name: db_ppm_offer_rela_his.cxx
  Created Date: 2002-10-08 
  Author: Machine
  Version: 1.0 
  Last Version Date: 
  Version Date:
*******************************************************************/
/********************************************************************
  Copyright by PCI, 2002-10-08
  Class Name: CTable_PPM_OFFER_RELA_HIS
  Created Date: 2002-10-08 
  Author: Machine
  Defined File: db_ppm_offer_rela_his.hxx
  Last Version Date: 
  Version Date:
*******************************************************************/
#include "table_ppm.h"

CTable_PPM_OFFER_RELA_HIS::CTable_PPM_OFFER_RELA_HIS( )
 :NPCRecordSet( )
{
  setTableName( "PPM_OFFER_RELA_HIS" );
  prepareTable();
  prepareQuery();
 
  HIS_ID.setField( "HIS_ID", DATA_CHAR, 20, 1 );
  makeTableItem( HIS_ID );
  makeKeyItem( HIS_ID ); 
  APP_ID.setField( "APP_ID", DATA_CHAR, 20, 0 );
  makeTableItem( APP_ID );
  PROD_OFFER_REL_ID.setField( "PROD_OFFER_REL_ID", DATA_DOUBLE, 12, 2 );
  makeTableItem( PROD_OFFER_REL_ID );
  makeKeyItem(PROD_OFFER_REL_ID);
  OFFER_A_ID.setField( "OFFER_A_ID", DATA_DOUBLE, 12, 0 );
  makeTableItem( OFFER_A_ID );
  OFFER_A_CD.setField( "OFFER_A_CD", DATA_CHAR, 30, 0 );
  makeTableItem( OFFER_A_CD );
  OFFER_Z_ID.setField( "OFFER_Z_ID", DATA_DOUBLE, 12, 0 );
  makeTableItem( OFFER_Z_ID );
  OFFER_Z_CD.setField( "OFFER_Z_CD", DATA_CHAR, 30, 0 );
  makeTableItem( OFFER_Z_CD );
  REMARK.setField( "REMARK", DATA_CHAR, 1024, 0 );
  makeTableItem( REMARK );
  ROLE_ID.setField( "ROLE_CD", DATA_DOUBLE, 9, 0 );
  makeTableItem( ROLE_ID );
  RELATION_TYPE_ID.setField( "RELATION_TYPE_CD", DATA_CHAR, 3, 0 );
  makeTableItem( RELATION_TYPE_ID );
  EFF_DATE.setField( "EFF_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( EFF_DATE );
  EXP_DATE.setField( "EXP_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( EXP_DATE );
  APP_STATE.setField( "APP_STATE", DATA_CHAR, 20, 0 );
  makeTableItem( APP_STATE );
  AMOUNT.setField("AMOUNT", DATA_CHAR , 20, 0);
  makeTableItem(AMOUNT);
  CATALOG_ID.setField("CATALOG_ID", DATA_CHAR , 20, 0);
  makeTableItem(CATALOG_ID);
  CREATE_DATE.setField("CREATE_DATE", DATA_DATETIME , 7, 0);
  makeTableItem(CREATE_DATE);
  AMOUNT_MAX.setField("AMOUNT_MAX", DATA_CHAR , 20, 0);
  makeTableItem(AMOUNT_MAX);
  RELA_SORT.setField("RELA_SORT", DATA_CHAR , 20, 0);
  makeTableItem(RELA_SORT);
}


CTable_PPM_OFFER_RELA_HIS::CTable_PPM_OFFER_RELA_HIS( NPConnection& pcldb )
 :NPCRecordSet( pcldb )
{
  setTableName( "PPM_OFFER_RELA_HIS" );
  prepareTable();
  prepareQuery();
 
  HIS_ID.setField( "HIS_ID", DATA_CHAR, 20, 1 );
  makeTableItem( HIS_ID );
  makeKeyItem( HIS_ID ); 
  APP_ID.setField( "APP_ID", DATA_CHAR, 20, 0 );
  makeTableItem( APP_ID );
  PROD_OFFER_REL_ID.setField( "PROD_OFFER_REL_ID", DATA_DOUBLE, 12, 2 );
  makeTableItem( PROD_OFFER_REL_ID );
  makeKeyItem(PROD_OFFER_REL_ID);
  OFFER_A_ID.setField( "OFFER_A_ID", DATA_DOUBLE, 12, 0 );
  makeTableItem( OFFER_A_ID );
  OFFER_A_CD.setField( "OFFER_A_CD", DATA_CHAR, 30, 0 );
  makeTableItem( OFFER_A_CD );
  OFFER_Z_ID.setField( "OFFER_Z_ID", DATA_DOUBLE, 12, 0 );
  makeTableItem( OFFER_Z_ID );
  OFFER_Z_CD.setField( "OFFER_Z_CD", DATA_CHAR, 30, 0 );
  makeTableItem( OFFER_Z_CD );
  REMARK.setField( "REMARK", DATA_CHAR, 1024, 0 );
  makeTableItem( REMARK );
  ROLE_ID.setField( "ROLE_CD", DATA_DOUBLE, 9, 0 );
  makeTableItem( ROLE_ID );
  RELATION_TYPE_ID.setField( "RELATION_TYPE_CD", DATA_CHAR, 3, 0 );
  makeTableItem( RELATION_TYPE_ID );
  EFF_DATE.setField( "EFF_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( EFF_DATE );
  EXP_DATE.setField( "EXP_DATE", DATA_DATETIME, 7, 0 );
  makeTableItem( EXP_DATE );
  APP_STATE.setField( "APP_STATE", DATA_CHAR, 20, 0 );
  makeTableItem( APP_STATE );
  AMOUNT.setField("AMOUNT", DATA_CHAR , 20, 0);
  makeTableItem(AMOUNT);
  CATALOG_ID.setField("CATALOG_ID", DATA_CHAR , 20, 0);
  makeTableItem(CATALOG_ID);
  CREATE_DATE.setField("CREATE_DATE", DATA_DATETIME , 7, 0);
  makeTableItem(CREATE_DATE);
  AMOUNT_MAX.setField("AMOUNT_MAX", DATA_CHAR , 20, 0);
  makeTableItem(AMOUNT_MAX);
  RELA_SORT.setField("RELA_SORT", DATA_CHAR , 20, 0);
  makeTableItem(RELA_SORT);
}

CTable_PPM_OFFER_RELA_HIS::~CTable_PPM_OFFER_RELA_HIS( )
{
    close();
}

